abort printing when the range is NULL. (#478803)
authorJean Brefort <jean.brefort@normalesup.org>
Fri, 21 Sep 2007 14:50:06 +0000 (14:50 +0000)
committerJean Bréfort <jbrefort@src.gnome.org>
Fri, 21 Sep 2007 14:50:06 +0000 (14:50 +0000)
2007-09-21  Jean Brefort  <jean.brefort@normalesup.org>

* gtk/gtkprintoperation.c: (print_pages_idle): abort printing
when the range is NULL. (#478803)

svn path=/trunk/; revision=18853

ChangeLog
gtk/gtkprintoperation.c

index a35fa7b23a93368d96b39470319a6b9678c24c23..5132cb72bebd0c426419f0d5b3486255fc252e49 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-09-21  Jean Brefort  <jean.brefort@normalesup.org>
+
+       * gtk/gtkprintoperation.c: (print_pages_idle): abort printing 
+       when the range is NULL. (#478803)
+
 2007-09-21  Michael Natterer  <mitch@imendio.com>
 
        * gtk/gtktextview.c (gtk_text_view_move_cursor_internal)
index 6ef30969be2645df0c76dc873d35882a117d2434..1c3a1901f08043f37fa532a4438ad4a3387155b6 100644 (file)
@@ -2098,6 +2098,11 @@ print_pages_idle (gpointer user_data)
        */
       if (priv->print_pages == GTK_PRINT_PAGES_RANGES)
        {
+         if (priv->page_ranges == NULL) {
+                 g_warning ("no pages to print");
+                 priv->cancelled = TRUE;
+                 goto out;
+         }
          data->ranges = priv->page_ranges;
          data->num_ranges = priv->num_page_ranges;
           for (i = 0; i < data->num_ranges; i++)